home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Sprite 1984 - 1993
/
Sprite 1984 - 1993.iso
/
man
/
lib.fmt
/
tcl
/
Tcl_Expr.man
< prev
next >
Wrap
Text File
|
1990-07-19
|
2KB
|
69 lines
Tcl_Expr Tcl Command Language Library Tcl_Expr
_________________________________________________________________
NNAAMMEE
Tcl_Expr - evaluate an expression
SSYYNNOOPPSSIISS
##iinncclluuddee <<ttccll..hh>>
int
TTccll__EExxpprr(_i_n_t_e_r_p, _s_t_r_i_n_g, _v_a_l_u_e_P_t_r)
AARRGGUUMMEENNTTSS
Tcl_Interp *_i_n_t_e_r_p (in) Interpreter in whose con-
text to evaluate _s_t_r_i_n_g.
char *_s_t_r_i_n_g (in) Expression to be evaluated.
int *_v_a_l_u_e_P_t_r (out) The expression's (integer)
value will be stored here.
_________________________________________________________________
DDEESSCCRRIIPPTTIIOONN
TTccll__EExxpprr is a utility procedure used by several of the Tcl
commands. Given a string whose contents are an expression
of the form accepted by the eexxpprr command, this procedure
evaluates the expression and returns the integer result in
*_v_a_l_u_e_P_t_r. Normally TTccll__EExxpprr returns TTCCLL__OOKK as its result.
However, if the expression contains a syntax error then
Tcl_Expr returns TTCCLL__EERRRROORR and sets _i_n_t_e_r_p->_r_e_s_u_l_t to point
to an error message in the usual fashion. TTccll__EExxpprr may make
nested calls to TTccll__EEvvaall while parsing the expression; if
any of these calls returns an error then TTccll__EExxpprr will
return that same error information. If an error is
returned, then *_v_a_l_u_e_P_t_r will not be modified.
KKEEYYWWOORRDDSS
evaluate, expression
Sprite v.1.0 Printed: July 18, 1990 1